package cn.edu.fzu.homemaking.company.domain.enums;

/**
 * @author wanjie
 * @version 1.0
 */
public enum ServerPriceModeEnum {
    NUMS(0, "按次数计费"),
    Times(1, "按时长计费");


    private final int value;

    private final String desc;

    private ServerPriceModeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static ServerPriceModeEnum parse(int value) {
        switch (value) {
            case 0:
                return NUMS;
            case 1:
                return Times;
            default:
                return null;
        }
    }
}
